from zope.component import getMultiAdapter

from Products.Five import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile

class ExternalEditorApplet(BrowserView):
    __call__ = ViewPageTemplateFile('templates/applet.pt')


class RedominoExtEditAppView(BrowserView):
    __call__ = ViewPageTemplateFile('templates/externaleditorview.pt')

    @property
    def externaleditor_available(self):
        externaleditor_available = getMultiAdapter((self.context, self.request), name=u'externaleditor_available')
        return externaleditor_available.available()

    

